using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._General
{
    /// <summary>
    /// <para>Copy</para>
    /// <para>Makes a copy of the input data.</para>
    /// <para>创建输入数据的副本。</para>
    /// </summary>    
    [DisplayName("Copy")]
    public class Copy : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Copy()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_data">
        /// <para>Input Data</para>
        /// <para>The data to be copied.</para>
        /// <para>要复制的数据。</para>
        /// </param>
        /// <param name="_out_data">
        /// <para>Output Data</para>
        /// <para>The location and name of the output data.</para>
        /// <para>输出数据的位置和名称。</para>
        /// </param>
        public Copy(object _in_data, object _out_data)
        {
            this._in_data = _in_data;
            this._out_data = _out_data;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Copy";

        public override string CallName => "management.Copy";

        public override List<string> AcceptEnvironments => ["configKeyword", "maintainAttachments", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_data, _out_data, _data_type, _associated_data];

        /// <summary>
        /// <para>Input Data</para>
        /// <para>The data to be copied.</para>
        /// <para>要复制的数据。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_data { get; set; }


        /// <summary>
        /// <para>Output Data</para>
        /// <para>The location and name of the output data.</para>
        /// <para>输出数据的位置和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_data { get; set; }


        /// <summary>
        /// <para>Data type</para>
        /// <para>The type of the data on disk to be copied. This is only necessary when the input data is in a geodatabase and naming conflicts exist, for example, if the geodatabase contains a feature dataset and a feature class with the same name. In this case, the data type is used to clarify which dataset you want to copy.</para>
        /// <para>磁盘上要复制的数据类型。仅当输入数据位于地理数据库中且存在命名冲突时（例如，地理数据库包含要素数据集和同名要素类时），才需要执行此操作。在本例中，数据类型用于阐明要复制的数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _data_type { get; set; } = null;


        /// <summary>
        /// <para>Associated Data</para>
        /// <para><xdoc>
        ///   <para>When the input has associated data, this parameter can be used to control the associated output data's name and config keyword.</para>
        ///   <bulletList>
        ///     <bullet_item>From Name—Data associated with the input data, which will also be copied.</bullet_item><para/>
        ///     <bullet_item>Data Type—The type of the data on disk to be copied. The only time you need to provide a value is when a geodatabase contains a feature dataset and a feature class with the same name. In this case, you need to select the data type, FeatureDataset or FeatureClass, of the item you want to copy.</bullet_item><para/>
        ///     <bullet_item>To Name—The name of the copied data in the Output Data.</bullet_item><para/>
        ///     <bullet_item>Config Keyword—The geodatabase storage parameters (configuration).</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The From Name and To Name column names will be identical if the To Name is not already used in Output Data. If a name already exists in the Output Data, a unique To Name will be created by appending an underscore plus a number, _1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>当输入具有关联数据时，此参数可用于控制关联输出数据的名称和 config 关键字。</para>
        ///   <bulletList>
        ///     <bullet_item>From Name - 与输入数据关联的数据，也将复制这些数据。</bullet_item><para/>
        ///     <bullet_item>数据类型 - 磁盘上要复制的数据类型。只有当地理数据库包含要素数据集和同名要素类时，才需要提供值。在这种情况下，您需要选择要复制的项的数据类型 FeatureDataset 或 FeatureClass。</bullet_item><para/>
        ///     <bullet_item>至名称 - 输出数据中复制数据的名称。</bullet_item><para/>
        ///     <bullet_item>配置关键字 - 地理数据库存储参数（配置）。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果“输出数据”中尚未使用“收件人名称”，则“发件人名称”和“收件人名称”列名称将相同。如果输出数据中已存在名称，则将通过附加下划线加数字 _1 来创建唯一的 To Name。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Associated Data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _associated_data { get; set; } = null;


        public Copy SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}